package com.jeesite.modules.rt.entity;

import javax.validation.constraints.Size;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * rt_device_updownEntity
 * @author 李寒冰
 * @version 2024-10-24
 */
@Table(name="rt_device_updown", alias="a", label="rt_device_updown信息", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="sn", attrName="sn", label="SN"),
		@Column(name="up", attrName="up", label="上行"),
		@Column(name="down", attrName="down", label="下行"),
		@Column(name="work_date", attrName="workDate", label="更新时间", isUpdateForce=true),
	}, orderBy="a.id DESC"
)
public class RtDeviceUpdown extends DataEntity<RtDeviceUpdown> {
	
	private static final long serialVersionUID = 1L;
	private String sn;		// SN
	private String up;		// 上行
	private String down;		// 下行
	private Date workDate;		// 更新时间

	public RtDeviceUpdown() {
		this(null);
	}
	
	public RtDeviceUpdown(String id){
		super(id);
	}
	
	@Size(min=0, max=255, message="SN长度不能超过 255 个字符")
	public String getSn() {
		return sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}
	
	@Size(min=0, max=50, message="上行长度不能超过 50 个字符")
	public String getUp() {
		return up;
	}

	public void setUp(String up) {
		this.up = up;
	}
	
	@Size(min=0, max=50, message="下行长度不能超过 50 个字符")
	public String getDown() {
		return down;
	}

	public void setDown(String down) {
		this.down = down;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getWorkDate() {
		return workDate;
	}

	public void setWorkDate(Date workDate) {
		this.workDate = workDate;
	}
	
}